var IETrueFireFoxFalse = IEOrFireFoxOrOther();

function IEOrFireFoxOrOther()
{
    var IETrueFireFoxFalse ;
    if (window.navigator.userAgent.indexOf("MSIE")>=1)
    {
        IETrueFireFoxFalse = true ;
    }
    else if (window.navigator.userAgent.indexOf("Firefox")>=1)
    {
        IETrueFireFoxFalse = false ;
    }
    else{
    
    }
   // alert(window.navigator.userAgent);
    return IETrueFireFoxFalse ;
}

function createXmlDoc()
{
    var xmlDoc ;
    
    if (IETrueFireFoxFalse)
    {
        xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
    }
    else if (!IETrueFireFoxFalse)
    {
        xmlDoc = new DOMParser();
    }
    else
    {
        xmlDoc = new ActiveXObject("Msxml2.XMLDOM"); 
    }
    
    return xmlDoc ;
};

function createXmlHttpRequest()
{
    var xmlHttpRequestObject ;
    
    if (IETrueFireFoxFalse)
    {
        xmlHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if (!IETrueFireFoxFalse)
    {
        xmlHttpRequestObject = new XMLHttpRequest();
    }
    else
    {
        xmlHttpRequestObject = new ActiveXObject("Msxml2.XMLHTTP"); 
    }
    
    return xmlHttpRequestObject ;
};

function doGetFalse(Url)
{
    var XmlHttp;
    XmlHttp=createXmlHttpRequest();
    XmlHttp.open("Get",Url,false);
    XmlHttp.send(null);
    return XmlHttp.responseText;
};
function doGetTrue(url,functionName)
{
    var xmlhttp=createXmlHttpRequest();
    xmlhttp.open("GET",url,true);
    xmlhttp.setRequestHeader("Cache-Control","no-cache");
    xmlhttp.onreadystatechange=function()
        {
            if(xmlhttp.readyState==4&&xmlhttp.status==200)
            {
            
            };
        };
    xmlhttp.send(null);
};

function doPostFalse(Url,questString)
{
    var XmlHttp=createXmlHttpRequest();
    XmlHttp.open("POST",Url,false);
    XmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
    XmlHttp.setRequestHeader ("Content-Length",questString.length);
    XmlHttp.send(questString);
    return XmlHttp.responseText;
};
function doPostTrue(url,poststr,functionName)
{
    var xmlhttp=createXmlHttpRequest();
    xmlhttp.open("POST",url,true);
    xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlhttp.SetRequestHeader ("Content-Length",poststr.length);
    xmlhttp.send(poststr);
    xmlhttp.onreadyStatechange=function()
        {
            if(xmlhttp.readyState==4&&xmlhttp.status==200)
            {
            
            };
        };
};

function statHtml()
{
    return'<html><head><base target="_blank"><script language="javascript">function killErrors(){return true;}window.onerror = killErrors;</script><style type="text/css">body{margin: 0px; padding: 0px 0px 0px 0px; border: 0px;}p { margin-top:0px;margin-bottom:0px;}</style></head><body></body></html>';
};

function GetCookie(sName)   
{     
   var aCookie=document.cookie.split("; "); 
   for(var i=0;i<aCookie.length;i++)   
   {      
        var aCrumb=aCookie[i].split("=");
        if(sName==aCrumb[0])     
            return unescape(aCrumb[1]);   
    }
    return null;  
};
